<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script src="../lib/vue.js"></script>
</head>
<body>
    <div id="app">
        {{num}}
        <button @click="my">app->{{num}}</button>
    </div>
    <button onclick="fn()">点我</button>
</body>
<script>
    const vm = new Vue({
        el:"#app",
        data:{
            num:100
        },
        methods:{
            my(){
                // console.log(this===vm)
                this.$el.style.color = "pink";
            }
        }
    })
    function fn(){
        // $el:vm所挂载的元素。
        console.log(vm.$el === document.querySelector("#app"));// true
        vm.$el.style.color="red";
    }
</script>
</html>